home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
2510.ZIP
/
TRSOURCE.EXE
/
HEX.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
566b
|
28 lines
/*********
* HEX.C
*
* by Ralph Davis
* modified by Tom Rettig
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* Syntax: HEX( <expN> )
* Return: Hexadecimal equivalent of <expN> as <expC>
*********/
#include "trlib.h"
TRTYPE hex()
{
static char funcname[] = { "hex" };
if ( PCOUNT==1 && ISNUM(1) )
{
long decnum = (long) _parnd(1);
char *_tr_hexasm();
_retc( _tr_hexasm(decnum) ); /* _tr_hexasm() does all the work */
}
else
_retc( _tr_errmsgs(funcname,E_SYNTAX) );
}